 
 
<!DOCTYPE html>
<html xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="utf-8">
  <title>详情</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="../../../res/layui/css/layui.css">
  <link rel="stylesheet" href="../../../res/css/global.css">
  <style>
    [v-cloak]{
      display: none;
    }
  </style>
</head>
<body>
<div class="header-page"></div>

  <div class="layui-hide-xs">
    <div class="fly-panel fly-column">
      <div class="layui-container">
        <ul class="layui-clear"  id="titlevue" v-cloak>
          <li class="layui-hide-xs"><a href="/index">首页</a></li>
          <li v-for="(item,index) in Colomn" :class="generateClassName(item.iD)">
            <a :href="'/jie/indexhtml?id='+item.iD" >{{ item.name }}</a>
          </li>
          <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><span class="fly-mid"></span></li>

          <!-- 用户登入后显示 -->
          <li v-if="session2!=null" class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a href="../user/index.html">我发表的贴</a></li>
          <li v-if="session2!=null" class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a href="../user/index.html#collection">我收藏的贴</a></li>
        </ul>

        <div class="fly-column-right layui-hide-xs">
          <span class="fly-search"><i class="layui-icon"></i></span>
          <a href="/jie/add" class="layui-btn">发表新帖</a>
        </div>
        <div class="layui-hide-sm layui-show-xs-block" style="margin-top: -10px; padding-bottom: 10px; text-align: center;">
          <a href="/jie/add" class="layui-btn">发表新帖</a>
        </div>
      </div>
    </div>
  </div>

  <div class="layui-container" id="artdetail" v-cloak>
    <div class="layui-row layui-col-space15">
      <div class="layui-col-md8 content detail">
        <div class="fly-panel detail-box" v-if="Article!=null">
          <h1>{{Article.title}}</h1>
          <div class="fly-detail-info">
            <!-- <span class="layui-badge">审核中</span> -->
            <span class="layui-badge layui-bg-green fly-detail-column">{{Article.columnsName}}</span>

            <span class="layui-badge" style="background-color: #999;">未结</span>
<!--             <span class="layui-badge" style="background-color: #5FB878;">已结</span>-->

            <span class="layui-badge layui-bg-black" v-if="Article.placedTop==1">置顶</span>
            <span class="layui-badge layui-bg-red" v-if="Article.goodPost==1">精帖</span>

            <div class="fly-admin-box" data-id="123">
              <span class="layui-btn layui-btn-xs jie-admin" type="del" v-on:click="deleteArt(Article.iD)" v-if="session!=null&&(session.role!=3||session.iD==Article.userID)">删除</span>

              <span class="layui-btn layui-btn-xs jie-admin" type="set" field="stick" rank="1" v-if="session!=null&&Article.placedTop!=1&&session.role!=3">置顶</span>
              <!-- <span class="layui-btn layui-btn-xs jie-admin" type="set" field="stick" rank="0" style="background-color:#ccc;">取消置顶</span> -->

              <span class="layui-btn layui-btn-xs jie-admin" type="set" field="status" rank="1" v-if="session!=null&&Article.goodPost!=1&&session.role!=3">加精</span>
              <!-- <span class="layui-btn layui-btn-xs jie-admin" type="set" field="status" rank="0" style="background-color:#ccc;">取消加精</span> -->
            </div>
            <span class="fly-list-nums">
            <a href="#"><i class="iconfont" title="回答">&#xe60c;</i> {{Article.commentsCount}}</a>
            <i class="iconfont" title="人气">&#xe60b;</i> {{Article.watchCount}}
          </span>
          </div>
          <div class="detail-about">
            <a class="fly-avatar" :href="'/user/homehtml?userID='+Article.userID">
              <img :src="Article.image" :title="Article.userName">
            </a>
            <div class="fly-detail-user">
              <a href="../user/home.html" class="fly-link">
                <cite>{{Article.userName}}</cite>
                <i class="iconfont icon-renzheng" title="认证信息：管理员 " v-if="Article.role!=3"></i>
                <i class="layui-badge fly-badge-vip" v-if="Article.role!=3">VIP3</i>
              </a>
              <span >{{ formatDate(Article.updateTime) }}</span>
            </div>
            <div class="detail-hits" id="LAY_jieAdmin" data-id="123">
              <span style="padding-right: 10px; color: #FF7200">悬赏：{{Article.experience}}飞吻</span>
              <span class="layui-btn layui-btn-xs jie-admin" type="edit" v-if="session!=null&&(session.iD=Article.userID)"><a :href="'/jie/add?id='+Article.iD">编辑此贴</a></span>
            </div>
          </div>
          <div class="detail-body photos" v-html="Article.content">

          </div>
        </div>
        <div class="fly-panel detail-box">
          <fieldset class="layui-elem-field layui-field-title" style="text-align: center;">
            <legend>回帖</legend>
          </fieldset>
          <ul class="jieda">
            <li  v-for="(item,index) in ArticleReply">
              <div class="detail-about detail-about-reply">
                <a class="fly-avatar" :href="'/user/homehtml?userID='+item.replyUserID">
                  <img :src="item.image" :alt="item.userName" :title="item.userName">
                </a>
                <div class="fly-detail-user">
                  <a :href="'/user/homehtml?userID='+item.replyUserID" class="fly-link">
                    <cite>{{item.userName}}</cite>
                    <i class="iconfont icon-renzheng" title="认证信息：管理员" v-if="item.role!=3"></i>
                    <i class="layui-badge fly-badge-vip" v-if="item.role!=3">VIP3</i>
                  </a>

                  <span v-if="item.userID==item.replyUserID">(楼主)</span>

                  <span style="color:#5FB878" v-if="item.role!=3">(管理员)</span>
                  <!--
                 <span style="color:#FF9E3F">（社区之光）</span>
                 <span style="color:#999">（该号已被封）</span>
                 -->
                </div>

                <div class="detail-hits">
                  <span>{{formatDate(item.replyTime)}}</span>
                </div>

                <i class="iconfont icon-caina" title="最佳答案" v-if="item.likeCount>10"></i>
              </div>
              <div class="detail-body jieda-body photos" v-html="item.replyContent">
              </div>
              <div class="jieda-reply">
              <span class="jieda-zan zanok" type="zan">
                <i class="iconfont icon-zan"></i>
                <em>{{item.likeCount}}</em>
              </span>
                <span type="reply">
                <i class="iconfont icon-svgmoban53"></i>
                回复
              </span>
                <div class="jieda-admin">
                  <span type="edit">编辑</span>
                  <span type="del" >删除</span>
                  <span class="jieda-accept" type="accept">采纳</span>
                </div>
              </div>
            </li>
            <!-- 无数据时 -->
            <li class="fly-none" v-if="ArticleReply.length==0">消灭零回复</li>
          </ul>

          <div class="layui-form layui-form-pane">
            <form action="/jie/reply" method="post">
              <div class="layui-form-item layui-form-text">
                <div class="layui-input-block">
                  <input id="ArtID" name="articleID" type="hidden" v-bind:value="Article.iD">
                  <input id="contentEd" name="replyContent" type="hidden" value="">
                  <div id="editor">
                  </div>
                </div>
              </div>
              <div class="layui-form-item" style="text-align: center;">
                <button  class="layui-btn" lay-filter="*" lay-submit>提交回复</button>
              </div>
            </form>
          </div>
        </div>
      </div>
      <div class="layui-col-md4">
        <dl class="fly-panel fly-list-one">
          <dt class="fly-panel-title">本周热议</dt>
          <dd v-for="(item,index) in ArticleTopNowWeek" :key="index">
            <a :href="'/jie/detailhtml?id='+item.iD">{{item.title}}</a>
            <span><i class="iconfont icon-pinglun1"></i> {{item.commentsCount}}</span>
          </dd>
          <!-- 无数据时 -->

          <div v-if="ArticleTopNowWeek.length==0" class="fly-none">没有相关数据</div>
        </dl>

        <div class="fly-panel">
          <div class="fly-panel-title">
            <div v-if="Advertising.length==0">没有任何广告数据</div>
          </div>
          <div class="fly-panel-main">
            <a href="/contact/writer" target="_blank" class="fly-zanzhu" style="background-color: #393D49;">虚席以待</a>
          </div>
        </div>

<!--        <div class="fly-panel" style="padding: 20px 0; text-align: center;">-->
<!--          <img src="/static/files//images/3af00303-3919-461e-9cf5-7fbdeab22482.jpg" style="max-width: 100%;" alt="layui">-->
<!--          <p style="position: relative; color: #666;">微信扫码关注公众号</p>-->
<!--        </div>-->
      </div>
    </div>
  </div>

  <div class="fly-footer">
    <p>Copyright &copy; 2020.Company name All rights reserved.</p>
  </div>


<script src="../../../res/layui/layui.js"></script>
<script src="../../../js/jquery-2.1.1.min.js"></script>
    <script>
      $('.header-page').load('../common/header.html');
    </script>
<script src="../../../js/vue.min.js"></script>
    <script src="../../../js/title.js"></script>
<script src="../../../js/artdetail.js"></script>
<!-- 注意， 只需要引用 JS，无需引用任何 CSS ！！！-->
<script type="text/javascript" src="../../../js/wangEditor.min.js"></script>
<script type="text/javascript">
  var E = window.wangEditor
  var editor = new E('#editor')
          //开启debug模式
  editor.customConfig.debug = true;
  // 自定义字体
  editor.customConfig.fontNames = [
    '宋体',
    '微软雅黑',
    'Arial',
    'Tahoma',
    'Verdana'
  ]
  var $contentEd = $('#contentEd')
  editor.customConfig.onchange = function () {

    // 监控变化，同步更新到 textarea
    $contentEd.val(editor.txt.html())
  }
  // 关闭粘贴内容中的样式
  editor.customConfig.pasteFilterStyle = false
  editor.customConfig.zIndex = 100
  // 忽略粘贴内容中的图片
  editor.customConfig.pasteIgnoreImg = true
  // 使用 base64 保存图片
  //editor.customConfig.uploadImgShowBase64 = true
  // 上传图片到服务器
  editor.customConfig.uploadFileName = 'file'; //设置文件上传的参数名称
  editor.customConfig.uploadImgServer = '/api/upload/'; //设置上传文件的服务器路径
  editor.customConfig.uploadImgMaxSize = 10 * 1024 * 1024; // 将图片大小限制为 3M
  editor.customConfig.uploadImgMaxLength = 5;
  editor.customConfig.uploadImgHooks = {

    success: function (xhr, editor, result) {
      // 图片上传并返回结果，图片插入成功之后触发
      // xhr 是 XMLHttpRequst 对象，editor 是编辑器对象，result 是服务器端返回的结果
    },
    fail: function (xhr, editor, result) {
      // 图片上传并返回结果，但图片插入错误时触发
      // xhr 是 XMLHttpRequst 对象，editor 是编辑器对象，result 是服务器端返回的结果
    },
    error: function (xhr, editor) {
      // 图片上传出错时触发
      // xhr 是 XMLHttpRequst 对象，editor 是编辑器对象
    }
  }
  editor.create()
</script>
</body>

</html>